public class StringBuilderDemo {
    //创建字符串
    public static void main(String[] args){
        //创建对象
        StringBuilder SB = new StringBuilder();

        //添加字符串
        SB.append("aaa");
        SB.append("bbb");
        SB.append("ccc");
        SB.append("ddd");
        SB.append("a").append("b").append("c").append("d");

        System.out.println(SB);

        //将StringBuilder变回字符串
        String str  =SB.toString();
        System.out.println(str);
    }
}
